<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>oojs继承</title>
    <link rel="stylesheet" href="../js/style/common.css">
    <script src="./js03_oojs_03.js" async></script>
</head>
<body>
    <h1>oojs继承</h1>
    <p class="msg"></p>
    <script>
        document.addEventListener("DOMContentLoaded",function(){
            let msg=document.querySelector(".msg");

            let person = new Person("zs");
            msg.innerHTML += person.sayHello();
            msg.innerHTML += "<br>"

            let teacher = new Teacher("ls","rjgc");
            msg.innerHTML += teacher.sayHello();
            msg.innerHTML += "<br>" 

            msg.innerHTML += teacher.walk();

            console.log(teacherteacher._proto_);
            console.log(teacher._proto_===Teacher.prototype);
            console.log(teacher._proto_.constructor);
            console.log(teacher._proto_._proto_.walk);
            console.log(teacher._proto_._proto_.constructor);
            console.log(teacher._proto_._proto_._proto_.constructor);
            console.log(teacher._proto_._proto_.sayHello);
        });
    </script>
</body>
</html>